import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import * as entities from './entities';
import { MediaModule } from '../media/media.module';
import * as controllers from './controllers';
import * as services from './services';
import { CommonService } from '../core/base/common.service';
import UserModule from '../User/user.module';
@Module({
  imports: [
    TypeOrmModule.forFeature([...Object.values(entities)]),
    MediaModule,
    UserModule,
  ],
  controllers: [...Object.values(controllers)],
  providers: [
    ...Object.values(services),
    {
      provide: CommonService,
      useClass: CommonService,
    },
  ],
  exports: [...Object.values(services)],
})
export class ShopModule {}
